<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ice="http://www.icesoft.com/icefaces/component" 
      xmlns:icecore="http://www.icefaces.org/icefaces/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ice:form id="popupForm">
            <ice:panelPopup id="draggablePnlPop"
            draggable="false"
            modal="true"
            visible="#{sessionBean.editable}"
            autoCentre="true">
            <f:facet name="header">
                <ice:panelGrid width="100%" cellpadding="0" 
                               cellspacing="0" columns="2" 
                               style="text-align: center;">
                    <ice:outputText style="color: #FFFFFF;" 
                                    value="Edit good"/>
                    <ice:commandButton 
                        image="#{resource['images:close.png']}" 
                        action="#{sessionBean.closePopup}" 
                        title="Close this draggable popup"/>
                </ice:panelGrid>
            </f:facet>
            <f:facet name="body">
                <ice:panelGrid columns="2">
                    Name:
                    <ice:inputText style="width: 200px;"
                                   value="#{sessionBean.currentGood.name}">
                    </ice:inputText>
                    Price:
                    <ice:inputText style="width: 200px;"
                                   value="#{sessionBean.currentGood.price}">
                    </ice:inputText>
                    Count:
                    <ice:inputText style="width: 200px;"
                                   value="#{sessionBean.currentGood.count}">        
                    </ice:inputText>
                    Description:
                    <ice:inputTextarea style="width: 200px;"
                                       value="#{sessionBean.currentGood.description}">

                    </ice:inputTextarea>
                    <ice:commandButton value="Cancel" 
                                       action="#{sessionBean.closePopup}">
                    </ice:commandButton>
                    <ice:commandButton value="Save"
                                       action="#{sessionBean.saveCurrentGood}">
                    </ice:commandButton>
                </ice:panelGrid>
            </f:facet>
        </ice:panelPopup>
        </ice:form>
       
    </h:body>
</html>

